package com.huawei.gamebox.service.welfare.common.bean;

import android.text.TextUtils;
import com.huawei.gamebox.service.common.cardkit.bean.BaseGsCardBean;
import java.util.HashSet;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
import o.ezo;
import o.ezs;
import o.fae;
import o.fam;

public abstract class AbsWithTitleCardBean extends BaseGsCardBean {
    private Set<String> nodeKey = new HashSet();

    public abstract List ˊ();

    public boolean ˋ(int i) {
        if (ˊ() == null || ˊ().size() == 0) {
            return true;
        }
        ListIterator listIterator = ˊ().listIterator(0);
        Object ᐝ = ॱ() ? ᐝ() : null;
        while (listIterator.hasNext()) {
            BaseGsCardBean baseGsCardBean = (BaseGsCardBean) listIterator.next();
            if (ˏ(baseGsCardBean.ˋ())) {
                listIterator.remove();
            } else if (!TextUtils.isEmpty(ᐝ) && ᐝ.equals(baseGsCardBean.ͺˏ())) {
                listIterator.remove();
            }
        }
        return ˊ().size() == 0;
    }

    protected boolean ॱ() {
        return false;
    }

    private boolean ˏ(String str) {
        if (str == null) {
            return false;
        }
        boolean contains = this.nodeKey.contains(str);
        if (contains) {
            return contains;
        }
        this.nodeKey.add(str);
        return contains;
    }

    public String ˋ() {
        return v_() + ॱॱ();
    }

    private String ᐝ() {
        fae ˏ = fam.ॱ().ˏ();
        if (ˏ == null) {
            return null;
        }
        ezo ˋ = ezs.ˏ().ˋ(ˏ.getGameInfo());
        if (ˋ != null) {
            return ˋ.ˋ();
        }
        return null;
    }
}
